﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace FacebookMvvmLight.Model
{
    [DataContract]
    public class FacebookUserProfile
    {
        private FacebookError _error = null;
        [DataMember]
        public FacebookError error
        {
            get { return _error; }
            set { _error = value; }
        }
        [DataMember]
        public string id { get; set; }
        [DataMember]
        public string name { get; set; }
        [DataMember]
        public string gender { get; set; }
        [DataMember]
        public DateTime birthday { get; set; }
        [DataMember]
        public string email { get; set; }
        [DataMember]
        public FacebookUserLocation location { get; set; }
        [DataMember]
        public FacebookUserPicture picture { get; set; }

        [DataContract]
        public class FacebookUserLocation
        {
            [DataMember]
            public string id { get; set; }
            [DataMember]
            public string name { get; set; }
        }

        [DataContract]
        public class FacebookUserPicture
        {
            [DataMember]
            public FacebookUserPictureUrl data { get; set; }
        }

        [DataContract]
        public class FacebookUserPictureUrl
        {
            [DataMember]
            public string url { get; set; }
            [DataMember]
            public bool is_silhouette { get; set; }
        }

        [DataContract]
        public class FacebookError
        {
            [DataMember]
            public string message { get; set; }
            [DataMember]
            public string type { get; set; }
            [DataMember]
            public int code { get; set; }
        }
    }
    public class FacebookAccessToken
    {
        public string AccessToken { get; set; }
        public DateTime Expires { get; set; }
        public bool IsSuccess { get; set; }
    }
}
